package com.ruoyi.sys.vehile.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.vehile.mapper.TbAlarmRecordMapper;
import com.ruoyi.sys.vehile.domain.TbAlarmRecord;
import com.ruoyi.sys.vehile.service.ITbAlarmRecordService;

/**
 * 报警(故障)记录Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class TbAlarmRecordServiceImpl implements ITbAlarmRecordService
{
    @Autowired
    private TbAlarmRecordMapper tbAlarmRecordMapper;

    /**
     * 查询报警(故障)记录
     *
     * @param arId 报警(故障)记录主键
     * @return 报警(故障)记录
     */
    @Override
    public TbAlarmRecord selectTbAlarmRecordByArId(Long arId)
    {
        return tbAlarmRecordMapper.selectTbAlarmRecordByArId(arId);
    }

    /**
     * 查询报警(故障)记录列表
     *
     * @param tbAlarmRecord 报警(故障)记录
     * @return 报警(故障)记录
     */
    @Override
    public List<TbAlarmRecord> selectTbAlarmRecordList(TbAlarmRecord tbAlarmRecord)
    {
        return tbAlarmRecordMapper.selectTbAlarmRecordList(tbAlarmRecord);
    }

    /**
     * 新增报警(故障)记录
     *
     * @param tbAlarmRecord 报警(故障)记录
     * @return 结果
     */
    @Override
    public int insertTbAlarmRecord(TbAlarmRecord tbAlarmRecord)
    {
        return tbAlarmRecordMapper.insertTbAlarmRecord(tbAlarmRecord);
    }

    /**
     * 修改报警(故障)记录
     *
     * @param tbAlarmRecord 报警(故障)记录
     * @return 结果
     */
    @Override
    public int updateTbAlarmRecord(TbAlarmRecord tbAlarmRecord)
    {
        return tbAlarmRecordMapper.updateTbAlarmRecord(tbAlarmRecord);
    }

    /**
     * 批量删除报警(故障)记录
     *
     * @param arIds 需要删除的报警(故障)记录主键
     * @return 结果
     */
    @Override
    public int deleteTbAlarmRecordByArIds(Long[] arIds)
    {
        return tbAlarmRecordMapper.deleteTbAlarmRecordByArIds(arIds);
    }

    /**
     * 删除报警(故障)记录信息
     *
     * @param arId 报警(故障)记录主键
     * @return 结果
     */
    @Override
    public int deleteTbAlarmRecordByArId(Long arId)
    {
        return tbAlarmRecordMapper.deleteTbAlarmRecordByArId(arId);
    }
}
